home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-17 | 10.9 KB | 488 lines | [SGPA/SCPG] |
- on Corporate
- Global theAddressData, vHelvetica
- Global DocumentKind
-
- if DocumentKind ≠ "business card" then
- set itemdel to numtochar(1)
- put 1 into linecount
- repeat with x = 1 to 12--2 to 9
- get item x of theAddressData
- if it ≠ empty then
- put it into line linecount of TheText
- add 1 to linecount
- end if
- end repeat
- set itemdel to ","
-
- put TheText into story "Address"
- select all text in story "address"
- set StyleRecomposition to false
- set textfont to vHelvetica
- set textsize to 10
- set RulerJustification to left
- set StyleRecomposition to true
- copyfit
- else -- make some cards
-
- -- build address block
- put empty into TheText
- set itemdel to numtochar(1)
- put 1 into linecount
- repeat with x = 2 to 12 --2 to 7
- if x ≠ 10 then
- get item x of theAddressData
- if it ≠ empty then
- put it into line linecount of TheText
- add 1 to linecount
- end if
- end if
- end repeat
- put TheText into story "address 1"
-
- select all text in story "address 1"
- set StyleRecomposition to false
- set textfont to vHelvetica
- set textface to plain
- set textsize to 12
- set RulerJustification to left
- set StyleRecomposition to true
- copyfit
-
-
- -- build name/position block
- put empty into TheText
- get item 1 of theAddressData
- if it ≠ empty then
- put it into story "person 1"
- select all text in story "person 1"
- set textfont to vHelvetica
- set textface to plain
- set textface to uppercase
- end if
- get item 10 of theAddressData
- if it ≠ empty then
- put cr&it after story "person 1"
- select text last line of story "person 1"
- set textfont to vHelvetica
- set textface to plain
- end if
- select all text in story "person 1"
- set FlexibleCharSize to false
- set StyleRecomposition to false
- set textsize to 12
- set RulerJustification to right
- set StyleRecomposition to true
- copyfit
-
- select all objects
- put measurements into oldMeasurements
- set measurements to millimeters
- replicate custom 1 98 100 0 100
- select all objects
- replicate custom 3 0 100 58 100
- select empty
- set measurements to oldMeasurements
- set itemdel to ","
- answer "Select " & quote & "Larger Print Area" & quote & " from Options…" with "OK"
- domenu "Page Setup…"
- end if
- end Corporate
-
-
- on Elegant
- Global theAddressData, vPalatino,vHelvetica
- Global DocumentKind
-
-
- set linedel to numtochar(1)
- set itemdel to numtochar(1) -- have to do this so commas in addresses aren't ignored
- set findString to numtoChar(1)
- set replaceString to ", "
-
- get line 2 of theAddressData
- if it ≠ empty then put it into story "Company Name"
-
- -- Set company name style
- Select all text in story "Company Name"
- set StyleRecomposition to false
- set textfont to vPalatino
- set textface to plain
- Set TextSize to 18
- set RulerJustification to Center
- set TextFace to SmallCaps
- set StyleRecomposition to true
- if not storyfits(story "Company Name") then
- set textface to plain
- copyfit
- end if
-
- if DocumentKind ≠ "business card" then
- put 1 into itemcount
- repeat with x = 1 to 12--3 to 9
- if x <> 2 then -- skip company name in this block
- get line x of theAddressData
- if it ≠ empty then
- put it into item itemcount of TheText
- add 1 to itemcount
- end if
- end if
- end repeat
- set linedel to cr
-
- put TheText into story "Address"
- select all text in story "Address"
- put replaceall(story "Address") into replaceCount
- select all text in story "Address"
- set StyleRecomposition to false
- set textfont to vPalatino
- set textface to plain
- set textsize to 12
- set RulerJustification to center
- set textface to SmallCaps
- set StyleRecomposition to true
- if not storyfits(story "Address") then
- set textface to plain
- copyfit
- end if
- else -- time to make some cards
-
- -- build address block
-
- put empty into TheText
- set linedel to numtochar(1)
- put 1 into itemcount
- repeat with x = 3 to 6 --2 to 6
- get line x of theAddressData
- if it ≠ empty then
- put it into item itemcount of TheText
- add 1 to itemcount
- end if
- end repeat
- put TheText into story "address 1"
- put replaceall(story "address 1") into replaceCount
-
- -- build phone block
- put empty into TheText
- put 1 into itemcount
- repeat with x = 7 to 12 --7 to 9
- if x ≠ 10 then
- get line x of theAddressData
- if it ≠ empty then
- put it into item itemcount of TheText
- add 1 to itemcount
- end if
- end if
- end repeat
- if theText ≠ empty then put cr&theText after story "address 1"
- set linedel to cr
-
- put replaceall(story "address 1") into replaceCount
- select all text in story "address 1"
- set StyleRecomposition to false
- set textfont to vPalatino
- set textface to plain
- set textsize to 12
- set RulerJustification to center
- set textface to SmallCaps
- set StyleRecomposition to true
- if not storyfits(story "address 1") then
- set textface to plain
- copyfit
- end if
-
-
- -- build name/position block
- put empty into TheText
- set itemdel to numtochar(1)
- get item 1 of theAddressData
- if it ≠ empty then put it into TheText
- get item 10 of theAddressData
- if it ≠ empty then put cr&it after TheText
- put theText into story "person 1"
- put replaceall(story "person 1") into replaceCount
- select all text in story "person 1"
- set styleRecomposition to false
- set textfont to vHelvetica
- set textsize to 10
- set textface to plain
- set textface to bold
- set styleRecomposition to true
- if item 10 of theAddressData ≠ empty then
- select text last line of story "person 1"
- set textfont to vHelvetica
- set textface to plain
- set textface to italic
- set textsize to 8
- end if
- select all text in story "person 1"
- set FlexibleCharSize to false
- set RulerJustification to center
- if not storyfits(story "person 1") then
- copyfit
- end if
-
- select all objects
- put measurements into oldMeasurements
- set measurements to millimeters
- replicate custom 1 96.5 100 0 100
- select all objects
- replicate custom 3 0 100 59 100
- set measurements to oldMeasurements
- select empty
-
- set itemdel to ","
- end if
- answer "Select " & quote & "Larger Print Area" & quote & " from Options…" with "OK"
- domenu "Page Setup…"
- end Elegant
-
-
- on Modern
- Global theAddressData, vHelvetica
- Global DocumentKind
-
- if DocumentKind ≠ "Business Card" then
- set itemdel to numtochar(1)
- put 1 into linecount
- repeat with x = 1 to 12
- get item x of theAddressData
- if it ≠ empty then
- put it into line linecount of TheText
- add 1 to linecount
- end if
- end repeat
- set itemdel to ","
- put TheText into story "Address"
- select all text in story "address"
- set StyleRecomposition to false
- set textfont to vHelvetica
- set textface to plain
- set textsize to 10
- set RulerJustification to right
- set FlexibleCharSize to false
- set StyleRecomposition to true
- copyfit
- else -- time to make some cards
-
- put empty into TheText
- set itemdel to numtochar(1)
- put 1 into linecount
- repeat with x = 2 to 6 --2 to 6
- get item x of theAddressData
- if it ≠ empty then
- put it into line linecount of TheText
- add 1 to linecount
- end if
- end repeat
- put TheText into story "address 1"
- select all text in story "address 1"
- set StyleRecomposition to false
- set textfont to vHelvetica
- set textface to plain
- set textsize to 10
- set RulerJustification to right
- set StyleRecomposition to true
- copyfit
-
- -- build name/position block
- put empty into TheText
- get item 1 of theAddressData
- if it ≠ empty then
- put it into story "person 1"
- select all text in story "person 1"
- set textfont to vHelvetica
- set textface to plain
- set textface to bold
- end if
- get item 10 of theAddressData
- if it ≠ empty then
- put cr&it after story "person 1"
- select text last line of story "person 1"
- set textfont to vHelvetica
- set textface to plain
- set textface to italic
- end if
-
- select all text in story "person 1"
- set FlexibleCharSize to false
- copyfit
-
- -- build phone block
- put empty into theText
- put 1 into linecount
- repeat with x = 7 to 12 --7 to 12
- if x ≠ 10 then
- get item x of theAddressData
- if it ≠ empty then
- put it into line linecount of TheText
- add 1 to linecount
- end if
- end if
- end repeat
- put TheText into story "phonefaxtelex 1"
- select all text in story "phonefaxtelex 1"
- set StyleRecomposition to false
- set textfont to vHelvetica
- set textface to plain
- set textsize to 10
- set RulerJustification to right
- set StyleRecomposition to true
- set FlexibleCharSize to false
- copyfit
- set itemdel to ","
-
- select all objects
- put measurements into oldMeasurements
- set measurements to millimeters
- replicate custom 1 95 100 0 100
- select all objects
- replicate custom 3 0 100 58 100
- set measurements to oldMeasurements
- select empty
- answer "Select " & quote & "Larger Print Area" & quote & " from Options…" with "OK"
- domenu "Page Setup…"
- end if
- end Modern
-
- on NewWave
- Global theAddressData, vHelvetica
- Global DocumentKind
-
- if DocumentKind ≠ "Business Card" then
- set itemdel to numtochar(1)
- put 1 into linecount
- repeat with x = 1 to 12 --2 to 8
- get item x of theAddressData
- if it ≠ empty then
- put it into line linecount of TheText
- add 1 to linecount
- end if
- end repeat
- set itemdel to ","
- put TheText into story "Address"
- select all text in story "address"
- set StyleRecomposition to false
- set textfont to vHelvetica
- set textface to plain
- set textface to italic
- set textsize to 10
- set RulerJustification to left
- set FlexibleCharSize to false
- set StyleRecomposition to true
- copyfit
-
- else
-
- -- start with a clean slate
- select empty
- -- select objects where the number of this object > 11
- -- clear
-
- -- build the text
- set itemdel to numtochar(1)
- put 1 into linecount
- repeat with x = 2 to 12 --2 to 12
- if x ≠ 10 then
- get item x of theAddressData
- if it ≠ empty then
- put it into line linecount of TheText
- add 1 to linecount
- end if
- end if
- end repeat
-
- add 1 to linecount
-
- get item 1 of theAddressData
- if it ≠ empty then
- put it into line linecount of TheText
- put linecount into nameline
- add 1 to linecount
- end if
- get item 10 of theAddressData
- if it ≠ empty then put it into line linecount of TheText
-
- -- Do cards' Text
-
- put TheText into story "Address 1"
- select all text in story "Address 1"
-
- set StyleRecomposition to false
- set textfont to vHelvetica
- set textface to plain
- set textface to italic
- set textsize to 10
- set RulerJustification to left
- set FlexibleCharSize to false
- if exists(nameline) then
- select text line nameline of story "Address 1"
- set textface to bold
- end if
- set StyleRecomposition to true
- copyfit
-
- set itemdel to ","
-
- select all objects
- replicate custom 1 276 100 0 100
- select all objects
- replicate custom 3 0 100 164 100
- select empty
- answer "Select " & quote & "Larger Print Area" & quote & " from Options…" with "OK"
- domenu "Page Setup…"
- end if
-
- end NewWave
-
- on Personal
- Global theAddressData, vHelvetica
-
-
- set itemdel to numtochar(1)
- put 1 into linecount
- repeat with x = 1 to 12
- get item x of theAddressData
- if it ≠ empty then
- put it into line linecount of TheText
- add 1 to linecount
- end if
- end repeat
- set itemdel to ","
-
- put TheText into story "Address"
- select all text in story "address"
- set StyleRecomposition to false
- set textfont to vHelvetica
- set textsize to 10
- set RulerJustification to left
- set StyleRecomposition to true
-
-
- end Personal
-
-
- on Traditional
- Global theAddressData, vHelvetica
-
- set itemdel to numtochar(1)
- put 1 into linecount
- repeat with x = 1 to 12 --1 to 9
- get item x of theAddressData
- if it ≠ empty then
- put it into line linecount of TheText
- add 1 to linecount
- end if
- end repeat
- set itemdel to ","
-
- put TheText into story "Address"
- select all text in story "address"
- set StyleRecomposition to false
- set textfont to vHelvetica
- set textsize to 10
- set RulerJustification to left
- set StyleRecomposition to true
- copyfit
-
- end Traditional